package de.baam;

import java.io.File;

public class ExternReader {
	
	public String readDriveLetter(String driveName) {
		int index = driveName.indexOf('(');
		String driveLetter = driveName.substring(index + 1, index + 3);
		driveLetter = driveLetter + "\\";
		return driveLetter;
	}

	public String readTxtInfo(String driveLetter) {
		String txtInfo = "";
		File folder = new File( driveLetter );
		for (File file : folder.listFiles()) {
			if (file.getName().contains(".txt")) {
				txtInfo = file.getName();
			}
		}
		return txtInfo;
	}

	public int countAllMainFolders() {
		// TODO Auto-generated method stub
		return 0;
	}

	public String readFolderName() {
		// TODO Auto-generated method stub
		return null;
	}

}
